// import jsonp from 'common/js/jsonp.js'
import axios from 'axios'

// 获取 主页数据
export function getGoodPrice (mountedTimestamp) {
  var timestampNow = new Date().getTime()
  let resetStartTime = mountedTimestamp - 1000000
  let delatTime = (timestampNow - mountedTimestamp) * 300 * 300
  var reTimestamp = resetStartTime - delatTime
  reTimestamp = '' + reTimestamp
  var timesort = reTimestamp.substr(0, reTimestamp.length - 3)
  const url = '/apizdm/good-price'
  const data = Object.assign({}, {
    timesort: timesort
  })
  return axios.get(url, {
    params: data
  }).then((res) => {
    return Promise.resolve(res.data)
  })
}
